# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.

defmodule GoogleApi.Partners.V2.Model.EventData do
  @moduledoc """
  Key value data pair for an event.

  ## Attributes

  - key (String.t): Data type. Defaults to: `null`.
    - Enum - one of [EVENT_DATA_TYPE_UNSPECIFIED, ACTION, AGENCY_ID, AGENCY_NAME, AGENCY_PHONE_NUMBER, AGENCY_WEBSITE, BUDGET, CENTER_POINT, CERTIFICATION, COMMENT, COUNTRY, CURRENCY, CURRENTLY_VIEWED_AGENCY_ID, DISTANCE, DISTANCE_TYPE, EXAM, HISTORY_TOKEN, ID, INDUSTRY, INSIGHT_TAG, LANGUAGE, LOCATION, MARKETING_OPT_IN, QUERY, SEARCH_START_INDEX, SERVICE, SHOW_VOW, SOLUTION, TRAFFIC_SOURCE_ID, TRAFFIC_SUB_ID, VIEW_PORT, WEBSITE, DETAILS, EXPERIMENT_ID, GPS_MOTIVATION, URL, ELEMENT_FOCUS, PROGRESS]
  - values ([String.t]): Data values. Defaults to: `null`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :key => any(),
          :values => list(any())
        }

  field(:key)
  field(:values, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.Partners.V2.Model.EventData do
  def decode(value, options) do
    GoogleApi.Partners.V2.Model.EventData.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Partners.V2.Model.EventData do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
